<?php
include_once("../configure/admin.config.inc.php");	//--> admin global var
include_once("db.inc.php");							//--> db global var
include_once("Smarty.class.php");					//--> out template
include_once("Operation.php");						//--> Operation
include_once("Country.php");						//--> Country
require_once("controlHeader.php");					//--> system control header
include_once("Strings.php");						//--> String

$objOperate	= new Operation($objSession->getLanguage());		//--> Operation
$objCountry	= new Country($uid);								//--> Country
$objString  = new Strings();									//--> String

$error_message = '';

$arrOperate 	= $objOperate->arrGetFromGroupIDAndMenuID($gid, $menuid);
$arrOperateInfo = $objOperate->arrGetOPInfo($arrOperate);

$arrDataList = $objCountry->lists($arrOperate, "", $page, DISPLAY_DATA_SIZE, '');
if(is_array($arrDataList)){
	foreach($arrDataList as $key => $value){
		$arrDataList[$key]['summary'] = $objString->cut(strip_tags($value['summary']), 60);
	}
}


/*----- out html -----*/
$smarty = new Smarty();		//----- out template
$smarty->template_dir = TEMPLATE_SYS_DIR;
$smarty->compile_dir  = COMPILE_SYS_DIR;

$smarty->assign('error_message', $error_message);
$smarty->assign('menuGid', $menuGid);
$smarty->assign('menuid', $menuid);

$smarty->assign('selfFileName', $objOperate->strGetSelfFileName());
$smarty->assign('arrOperateInfo', $arrOperateInfo);

$smarty->assign('arrDataList', $arrDataList);
$smarty->assign('PAGE_BAR', $objQA->pagenav);

$smarty->display('listCountry.htm');
?>
